
project(plugin-isomode LANGUAGES CXX)
set(PROJECT_VERSION 0.0.1)

add_library(${PROJECT_NAME} SHARED)

## Compiletion options
add_definitions(-DPLUGIN_INTERNAL_NAME="${PROJECT_NAME}")
add_definitions(-DPLUGIN_VERSION="${PROJECT_VERSION}")

target_link_libraries(${PROJECT_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::Widgets)
target_link_libraries(${PROJECT_NAME} PRIVATE utility)

## Sources
set(PLUGIN_SOURCES
    plugin-config.h
    plugin.h
    plugin.cpp
)
source_group("Sources" FILES ${PLUGIN_SOURCES})
target_sources(${PROJECT_NAME} PRIVATE ${PLUGIN_SOURCES})

## Sources - UI
set(PLUGIN_SOURCES_UI
    isomode.h
    isomode.cpp
    isomode.ui
)
source_group("Sources/UI" FILES ${PLUGIN_SOURCES_UI})
target_sources(${PROJECT_NAME} PRIVATE ${PLUGIN_SOURCES_UI})

## Sources - Assets
set(PLUGIN_SOURCES_ASSETS
    plugin-isomode.qrc
)
source_group("Sources/Assets" FILES ${PLUGIN_SOURCES_ASSETS})
target_sources(${PROJECT_NAME} PRIVATE ${PLUGIN_SOURCES_ASSETS})

set(TS_SOURCE_FILES ${PLUGIN_SOURCES} ${PLUGIN_SOURCES_UI})

## Plugin common options
include(${CMAKE_SOURCE_DIR}/cmake/plugins.cmake)
